package info.emamian.droplet.worker.sms;

import info.emamian.droplet.data.DynamoDbSms;

import java.util.List;

public abstract class AbstractSMSHandler {
	private String answer = null;

	protected abstract List<String> getKewordsList();

	protected abstract String processAnswer(DynamoDbSms sms);

	public abstract String getUsage();

	final public boolean canAnswer(DynamoDbSms sms) {
		answer = processAnswer(sms);
		if (answer == null) { return false; }
		answer = answer.trim();
		return true;
	}

	final public String getAnswer() {
		return answer;
	}
}
